#include "widget.h"
#include <iostream>
#include <QApplication>

template<typename T>
class PrintEverything
{
private:
    T data;
public:
    void setData(T data)
    {
        this->data = data;
    }
    void printData()
    {
        std::cout << data << std::endl;
    }
};

class People
{
public:
    int num;
    People()
    {
        std::cout << "People Construct Function called..." << std::endl;
    }
    ~People()
    {
        std::cout << "People DesConstruct Function called..." << std::endl;
    }
};

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Widget w;
    w.show();

    PrintEverything<int> p1;
    p1.setData(26);
    p1.printData();

    People p;
    p.num = 5;

    People *p2 = new People;
    p2->num = 26;

    QList<int> l;
    l.push_back(26);
    l.push_back(54);
    l.push_back(80);
    for(int i = 0; i < l.count(); i++)
    {
        std::cout << "-- " << l[i] << std::endl;
    }


    return a.exec();
}
